* clion spell fixes, and a few cet retirements.
cet retirements were unused.
* more spelling fixes.
if (!arcfileopt &&
(ed->arcpt2->altitude != unknown_alt) &&
(ptsopt || (ed->arcpt1->altitude != unknown_alt))) {
- /* Interpolate alititude */
+ /* Interpolate altitude */
if (ptsopt) {
wp->altitude = ed->arcpt2->altitude;
} else {
};
// Apparently, the icons are undocumented, so we made up names,
-// preferring them to be consistent with other brands where possiblde.
+// preferring them to be consistent with other brands where possible.
typedef struct {
const signed int symbol;
{ 0x19, "Blue Diamond Checkmark" }, // undocumented.
{ 0x1a, "Camera" },
- { 0x1b, "Restaraunt" }, // "Fork/Knife (meal place?)"
+ { 0x1b, "Restaurant" }, // "Fork/Knife (meal place?)"
{ 0x1c, "Restroom" }, // (man & Woman icon)"
{ 0x1d, "RV Park" }, // "Bus or RV (RV campground?)"
{ 0x1e, "Potable Water" }, // (faucet/glass or bucket)"
{ 0x20, "Anchor in square" },
{ 0x21, "Boat ramp/launch" },
{ 0x22, "Anchor" },
- { 0x23, "Bouy" },
+ { 0x23, "Buoy" },
{ 0x24, "Man Overboard?" },
{ 0x25, "Snow Skiing" },
- { 0x26, "Mouantin/Mountain Peak" },
+ { 0x26, "Mountain/Mountain Peak" },
{ 0x27, "Turkey Tracks/animal tracks" },
- { 0x28, "Bank" }, // "Cash (ATM MAybe)"
+ { 0x28, "Bank" }, // "Cash (ATM Maybe)"
{ 0x29, "Bar" }, // "Martini undocumented"
{ 0x2a, "Lighthouse" },
{ 0x2b, "Tent" },
- { 0x2c, "Cresent Wrench or can opener" },
+ { 0x2c, "Crescent Wrench or can opener" },
{ 0x2d, "School" }, //? White Building with tunnel looking door and flag on top."
{ 0x2f, "Information" }, // "i (info/internet maybe?)"
{ 0x3b, "Officer? Looks like man leaned over holding blue cube..." },
{ 0x3c, "Parking" }, //"Car Parked"
{ 0x3d, "Airport" },
- { 0x3e, "Bus Terminal" }, // (guess) Loks like Bus under canopy."
+ { 0x3e, "Bus Terminal" }, // (guess) Looks like Bus under canopy."
{ 0x3f, "Red Cross" },
- { 0x40, "Red Buidling with flag, Fire Station maybe." },
+ { 0x40, "Red Building with flag, Fire Station maybe." },
{ 0x41, "Bus" },
{ 0x42, "Officer" }, // "see 3b: duplicate"
{ 0x43, "Railroad" },
/* %%% cet_char_to_ucs4 %%%
*
* single character to UCS-4 code %%%
- * return values: 0 if convertable character, otherwise 1
+ * return values: 0 if convertible character, otherwise 1
*/
int
*
* convert single UCS-4 value to original character from CS
*
- * return values: coverted character or "CET_NOT_CONVERTABLE_DEFAULT"
+ * return values: converted character or "CET_NOT_CONVERTABLE_DEFAULT"
* if not possible
*/
short
/* %%% cet_utf8_to_char %%%
*
- * Convert single UTF-8 sequence directly into associated characted
+ * Convert single UTF-8 sequence directly into associated characters
* by given character set.
*/
typedef struct cet_ucs4_link_s {
int value; /* UCS-4 value */
- short origin; /* associeted character */
+ short origin; /* associated character */
} cet_ucs4_link_t;
typedef struct cet_cs_vec_s {
void cet_register();
void cet_deregister();
-/* short hand transmissions */
-
-char* cet_str_utf8_to_cp1252(const char* src);
-char* cet_str_cp1252_to_utf8(const char* src);
extern cet_cs_vec_t cet_cs_vec_cp1252;
-char* cet_str_iso8859_1_to_utf8(const char* src);
-char* cet_str_utf8_to_iso8859_1(const char* src);
-extern cet_cs_vec_t cet_cs_vec_iso8859_1;
-
extern cet_cs_vec_t cet_cs_vec_ansi_x3_4_1968;
short* cet_str_utf8_to_uni(const char* src, int* length);
History:
10/23/2005: First release; only a reader
10/25/2005: becomes a writer too
- 10/26/2005: received documention from CompeGPS team
+ 10/26/2005: received documentation from CompeGPS team
added fatals for "G" and "U" if not WGS84 and lat/lon
08/13/2006: switch to gbfile api
*/
&wpt->latitude,
&wpt->altitude,
&interp, name)) {
- fatal(MYNAME ": Could not interprete line %d!\n", line);
+ fatal(MYNAME ": Could not interpret line %d!\n", line);
}
data_lines++;
extern const char gpsbabel_version[];
extern time_t gpsbabel_now; /* gpsbabel startup-time; initialized in main.c with time() */
extern time_t gpsbabel_time; /* gpsbabel startup-time; initialized in main.c with current_time(), ! ZERO within testo ! */
-extern int geocaches_present;
typedef enum {
fix_unknown=-1,
gt_virtual,
gt_letterbox,
gt_event,
- gt_suprise,
+ gt_surprise,
gt_webcam,
gt_earth,
gt_locationless,
};
// These are dicey as they're collected on read. Subsequent filters may change
-// things, though it's u nlikely to matter in practical terms. Don't use these
+// things, though it's unlikely to matter in practical terms. Don't use these
// if a false positive would be deleterious.
#
class global_trait
*/
int route_priority;
- /* Optional dilution of precision: positional, horizontal, veritcal.
+ /* Optional dilution of precision: positional, horizontal, vertical.
* 1 <= dop <= 50
*/
float hdop;
// FIXME: Generally it is inefficient to use an element pointer or reference to define the element to be deleted, use iterator instead,
// and/or implement pop_back() a.k.a. removeLast(), and/or pop_front() a.k.a. removeFirst().
void del_head(route_head* rte); // a.k.a. erase()
- // FIXME: Generally it is inefficent to use an element pointer or reference to define the insertion point, use iterator instead.
+ // FIXME: Generally it is inefficient to use an element pointer or reference to define the insertion point, use iterator instead.
void insert_head(route_head* rte, route_head* predecessor); // a.k.a. insert
void add_wpt(route_head* rte, Waypoint* wpt, bool synth, const QString& namepart, int number_digits);
- // FIXME: Generally it is inefficent to use an element pointer or reference to define the insertion point, use iterator instead.
+ // FIXME: Generally it is inefficient to use an element pointer or reference to define the insertion point, use iterator instead.
void del_wpt(route_head* rte, Waypoint* wpt);
void common_disp_session(const session_t* se, route_hdr rh, route_trl rt, waypt_cb wc);
void flush(); // a.k.a. clear()
// FIXME: case_ignore_strcmp() and case_ignore_strncmp() should probably
// just be replaced at the call sites. These shims are just here to make
-// them more accomidating of QString input.
+// them more accommodating of QString input.
inline int
case_ignore_strcmp(const QString& s1, const QString& s2)
{
#define CET_CHARSET_MS_ANSI "windows-1252"
#define CET_CHARSET_LATIN1 "ISO-8859-1"
-#define str_utf8_to_cp1252(str) cet_str_utf8_to_cp1252((str))
-#define str_cp1252_to_utf8(str) cet_str_cp1252_to_utf8((str))
-
-#define str_utf8_to_iso8859_1(str) cet_str_utf8_to_iso8859_1((str))
-#define str_iso8859_1_to_utf8(str) cet_str_iso8859_1_to_utf8((str))
-
/* this lives in gpx.c */
gpsbabel::DateTime xml_parse_time(const QString& cdatastr);
signed int si_round(double d);
/*
- * Protypes for Endianness helpers.
+ * Prototypes for Endianness helpers.
*/
signed int be_read16(const void* ptr);
"-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr
},
{
- "hdopandvdop", &andopt, "Link hdop and vdop supression with AND",
+ "hdopandvdop", &andopt, "Link hdop and vdop suppression with AND",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
{
- "sat", &satopt, "Minimium sats to keep points",
+ "sat", &satopt, "Minimum sats to keep points",
"-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX, nullptr
},
{
qDebug() << "point.lntervalTime:" << point.lntervalTime;
}
- //Time from last point in sec's * 10 (e.g. point.lntervalTime is sec multiplied witn 10)
- // convert to milisecs
+ //Time from last point in sec's * 10 (e.g. point.lntervalTime is sec multiplied with 10)
+ // convert to millisecs
gpsbabel::DateTime gpsbabeltime = gpsDateTime.addMSecs(point.lntervalTime*100);
gpsDateTime.setDate(gpsbabeltime.date());
gpsDateTime.setTime(gpsbabeltime.time());
#define GPS_IFD_TAG_DATESTAMP 0x001D
struct ExifTag {
- uint16_t id{0}; // tag that identifieds the field.
+ uint16_t id{0}; // tag that identifies the field.
uint16_t type{0}; // field type.
uint32_t count{0}; // number of values. Note that Count is not the total number of bytes.
uint32_t offset{0}; // byte offset relative to beginning of TIFF file to value (only for values longer than 4 bytes).
The map file contains a constant 30 byte header record followed by a variable number of
TT records. The TT records start with the two characters "TT" and are 251 bytes long.
- The TT records conatain values for time, position and velocity.
+ The TT records contain values for time, position and velocity.
*/
// its base class type.
// https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP52-CPP.+Do+not+delete+a+polymorphic+object+without+a+virtual+destructor
virtual ~Filter() = default;
- // And that requires us to explictly default the move and copy operations.
+ // And that requires us to explicitly default the move and copy operations.
// https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all.
Filter(const Filter&) = default;
Filter& operator=(const Filter&) = default;
#endif
/*
- * Rather than propogate Garmin-specific data types outside of the Garmin
+ * Rather than propagate Garmin-specific data types outside of the Garmin
* code, we convert the PVT (position/velocity/time) data from the receiver
* to the data type we use throughout. Yes, we do lose some data that way.
*/
}
tx_waylist[i]->ident[sizeof(tx_waylist[i]->ident)-1] = 0;
- // If we were explictly given a comment from GPX, use that.
+ // If we were explicitly given a comment from GPX, use that.
// This logic really is horrible and needs to be untangled.
if (!wpt->description.isEmpty() &&
global_opts.smart_names && !wpt->gc_data->diff) {
int n = waypoint_prepare();
if ((ret = GPS_Command_Send_Waypoint(portname, tx_waylist, n, waypt_write_cb)) < 0) {
- fatal(MYNAME ":communication error sending wayoints..\n");
+ fatal(MYNAME ":communication error sending waypoints..\n");
}
for (int i = 0; i < n; ++i) {
// This is so gross. By the time we know it's not a USB device
// and could be one of our devices, we're so deep into the callstack
-// that can't back out tracefully without bludgeoning most of the
+// that can't back out gracefully without bludgeoning most of the
// (Mac|Lin|Win) x (USB|Serial) matrix. Since we don't *really* want
// to progress any further, we just longjump back to the caller...
#include <csetjmp>
}
*dest = (garmin_fs_t*) xmalloc(sizeof(*src));
- /* do not copy interlinks, only increment the refrence counter */
+ /* do not copy interlinks, only increment the reference counter */
if (src->ilinks != nullptr) {
src->ilinks->ref_count++;
}
bounds bds;
writer_data_t* top_left{nullptr};
writer_data_t* top_right{nullptr};
- writer_data_t* buttom_left{nullptr};
- writer_data_t* buttom_right{nullptr};
+ writer_data_t* bottom_left{nullptr};
+ writer_data_t* bottom_right{nullptr};
};
typedef struct gpi_waypt_data_s {
if (data->top_right) {
wdata_free(data->top_right);
}
- if (data->buttom_left) {
- wdata_free(data->buttom_left);
+ if (data->bottom_left) {
+ wdata_free(data->bottom_left);
}
- if (data->buttom_right) {
- wdata_free(data->buttom_right);
+ if (data->bottom_right) {
+ wdata_free(data->bottom_right);
}
delete data;
if (wpt->latitude < center_lat) {
if (wpt->longitude < center_lon) {
- ref = &data->buttom_left;
+ ref = &data->bottom_left;
} else {
- ref = &data->buttom_right;
+ ref = &data->bottom_right;
}
} else {
if (wpt->longitude < center_lon) {
if (data->top_right) {
wdata_check(data->top_right);
}
- if (data->buttom_left) {
- wdata_check(data->buttom_left);
+ if (data->bottom_left) {
+ wdata_check(data->bottom_left);
}
- if (data->buttom_right) {
- wdata_check(data->buttom_right);
+ if (data->bottom_right) {
+ wdata_check(data->bottom_right);
}
}
if (data->top_right) {
res += wdata_compute_size(data->top_right);
}
- if (data->buttom_left) {
- res += wdata_compute_size(data->buttom_left);
+ if (data->bottom_left) {
+ res += wdata_compute_size(data->bottom_left);
}
- if (data->buttom_right) {
- res += wdata_compute_size(data->buttom_right);
+ if (data->bottom_right) {
+ res += wdata_compute_size(data->bottom_right);
}
data->sz = res;
if (data->top_right) {
wdata_write(data->top_right);
}
- if (data->buttom_left) {
- wdata_write(data->buttom_left);
+ if (data->bottom_left) {
+ wdata_write(data->bottom_left);
}
- if (data->buttom_right) {
- wdata_write(data->buttom_right);
+ if (data->bottom_right) {
+ wdata_write(data->bottom_right);
}
}
{ -1, 8363, "Steak" },
{ -1, 8223, "Street Intersection" },
{ -1, 16401, "TACAN" },
- { -1, 183, "Tide/Current PRediction Station" },
+ { -1, 183, "Tide/Current Prediction Station" },
{ -1, 191, "U Marina" },
{ -1, 8193, "US hwy" },
{ -1, 193, "U stump" },
if (! valid) {
gbfprintf(fout, "#####\n");
- fatal(MYNAME ": %s (%s) is outside of convertable area \"%s\"!\n",
+ fatal(MYNAME ": %s (%s) is outside of convertible area \"%s\"!\n",
wpt->shortname.isEmpty() ? "Waypoint" : qPrintable(wpt->shortname),
pretty_deg_format(wpt->latitude, wpt->longitude, 'd', nullptr, 0),
gt_get_mps_grid_longname(grid_index, MYNAME));
parse_track_header();
} else if (case_ignore_strcmp(cin, "Map") == 0) /* do nothing */ ;
else {
- fatal(MYNAME ": Unknwon identifier (%s) at line %d!\n", cin, current_line);
+ fatal(MYNAME ": Unknown identifier (%s) at line %d!\n", cin, current_line);
}
/* flush pending data */
}
/*
- * Decompose Last Waypoint Eleveation
+ * Decompose Last Waypoint Elevation
*/
static void
format_garmin_xt_decomp_last_ele(uint8_t ii, double* PrevEle, const uint8_t TrackBlock[])
gbsize_t result = fread(buf, size, members, self->handle.std);
if ((result < members) && (errno = ferror(self->handle.std))) {
- fatal("%s: Error %d occured during read of file '%s'!\n",
+ fatal("%s: Error %d occurred during read of file '%s'!\n",
self->module, errno, self->name);
}
return result;
*/
// This is a depressing hack, meant to ease the pain from C strings
-// to QStrings, which are consitently encoded.
+// to QStrings, which are consistently encoded.
int
gbfputs(const QString& s, gbfile* file)
{
}
-/* Thats all, sorry. */
+/* That's all, sorry. */
* COM ports 1 - 9 are "COM1:" through "COM9:"
* The one after that is \\.\\com10 - this function tries to plaster over
* that.
- * It returns a pointer to a staticly allocated buffer and is therefore not
+ * It returns a pointer to a statically allocated buffer and is therefore not
* thread safe. The buffer pointed to remains valid only until the next
* call to this function.
*/
// is incoming data. This has been shown to trigger driver
// bugs in the Prolific drivers for Mac and in certain Linux
// kernels, thought the latter has since been fixed.
- // So althogh removing this means that the timeout behaviour
+ // So although removing this means that the timeout behaviour
// is actually different on POSIX and WIN32, it triggers
// fewer buts this way. 2/12/2008 RJL
if (/* (rc = set_rx_timeout(h, vmin, vtime), rc < 0) || */
* COM ports 1 - 9 are "COM1:" through "COM9:"
* The one after that is \\.\\com10 - this function tries to plaster over
* that.
- * It returns a pointer to a staticly allocated buffer and is therefore not
+ * It returns a pointer to a statically allocated buffer and is therefore not
* thread safe. The buffer pointed to remains valid only until the next
* call to this function.
*/
// all that while (while keeping the character sets correct) and
// not pushing that decision down into gbfread. This module is
// still pretty messy and the points as to which fields are encode
-// which ways in which versions are not at all clear, leaing to
-// encoding issues on read and leaks because of teh differences
+// which ways in which versions are not at all clear, leading to
+// encoding issues on read and leaks because of the differences
// in calling conventions on who owns/destroys the result.
#define FREAD_CSTR_AS_QSTR gbfgetcstr(fin)
/*
A "gbfgetcstr" (FREAD_CSTR) works too, but if we get a wrong file as input,
the file validation my be comes too late. For example a XML base file normally
- has no binary zeros inside and produce, if big enought, a buffer overflow.
+ has no binary zeros inside and produce, if big enough, a buffer overflow.
The following message "local buffer overflow detected..." could be
misinterpreted.
*/
}
if (links == 0) {
- /* Without links we need all informations from wpt */
+ /* Without links we need all information from wpt */
Waypoint* tmp = gdb_reader_find_waypt(wpt, 0);
if (tmp != nullptr) {
delete wpt;
int wpt_class = wpt->wpt_flags.fmt_use; /* trick */
- FWRITE_CSTR(shortname); /* uniqe (!!!) shortname */
+ FWRITE_CSTR(shortname); /* unique (!!!) shortname */
FWRITE_i32(wpt_class); /* waypoint class */
FWRITE_CSTR(GMSD_GET(cc, "")); /* country code */
str = "";
}
FWRITE_CSTR(str);
- FWRITE(zbuf, 5); /* instruction dependend */
+ FWRITE(zbuf, 5); /* instruction dependent */
/* GBD doesn't have a native description field */
/* here we misuse the instruction field */
/*
* This is the bridge between the GPSBabel and globalsat sport devices
* gh625XT. Globalsat has a few devices under the sport brand and they
- * are using a similar USB serial protocal.
+ * are using a similar USB serial protocol.
* Currently only gh625XT is supported by this driver but the code could
* extended (maybe autodetect) support more devices in the future.
*
static char* opt_dump_file = nullptr; // dump raw data to this file (optional)
static char* opt_input_dump_file = nullptr; // if true input is from a dump-file instead of serial console
-static gbfile* dumpfile = nullptr; // used for creating bin/RAW datadump files, usefull for testing
-static gbfile* in_file = nullptr; // used for reading from bin/RAW datadump files, usefull for testing
+static gbfile* dumpfile = nullptr; // used for creating bin/RAW datadump files, useful for testing
+static gbfile* in_file = nullptr; // used for reading from bin/RAW datadump files, useful for testing
static
arglist_t globalsat_args[] = {
HeaderTypeLaps = 0xAA,
HeaderTypeTrackPoints = 0x55,
- ResponseInsuficientMemory = 0x95,
+ ResponseInsufficientMemory = 0x95,
ResponseResendTrackSection = 0x92,
ResponseSendTrackFinish = 0x9A
} globalsat_commands_e;
int bytes = gbfread(&result, 1, 1, in_file);
is_fatal((bytes != 1), MYNAME ": read error");
}
- // Check if byte sould be dumped also into a file
+ // Check if byte should be dumped also into a file
if (dumpfile) {
gbfwrite(&result, 1, 1, dumpfile);
}
globalsat_probe_device()
{
//TODO try this first if fails try with false, to support 561
- isSizeSwapped = false; //all devices but gh561 since gh561 has swaped size.
+ isSizeSwapped = false; //all devices but gh561 since gh561 has swapped size.
globalsat_send_simple(CommandWhoAmI);
printf(MYNAME " rd_init() creating dumpfile %s FAILED continue anyway\n",opt_dump_file);
} else {
if (global_opts.debug_level > 1) {
- printf(MYNAME " rd_init() creating dumpfile %s for writing binnary copy of serial stream\n",opt_dump_file);
+ printf(MYNAME " rd_init() creating dumpfile %s for writing binary copy of serial stream\n",opt_dump_file);
}
}
}
uint8_t trackDeviceCommand;
int track_length;
uint8_t* track_payload = globalsat_read_package(&track_length, &trackDeviceCommand);
- is_fatal(((track_length == 0) || (track_payload == nullptr)) , "tracklength in 0 bytes or payload nonexistant");
+ is_fatal(((track_length == 0) || (track_payload == nullptr)) , "track length is 0 bytes or payload nonexistent");
// printf("Got track package!!! Train data\n");
uint8_t* dbtrain = track_payload;
while (total_laps_left > 0) {
globalsat_send_simple(CommandGetNextTrackSection);
track_payload = globalsat_read_package(&track_length, &trackDeviceCommand);
- is_fatal(((track_length == 0) || (track_payload == nullptr)), "tracklength in 0 bytes or payload nonexistant");
+ is_fatal(((track_length == 0) || (track_payload == nullptr)), "track length is 0 bytes or payload nonexistent");
// printf("Got track package!!! Laps data\n");
uint8_t* hdr = track_payload;
point.PwrCadence = be_readu16(ghpoint+21);
point.Power = be_readu16(ghpoint+23);
- //Time from last point in sec's * 10 (e.g. point.lntervalTime is sec multiplied witn 10)
- // convert to milisecs
+ //Time from last point in sec's * 10 (e.g. point.IntervalTime is sec multiplied with 10)
+ // convert to millisecs
gpsbabel::DateTime gpsbabeltime = gpsDateTime.addMSecs(point.IntervalTime*100);
gpsbabeltime.setTimeSpec(Qt::UTC);
gpsDateTime.setDate(gpsbabeltime.date());
}
}
-// This used the serial comunication to the watch
+// This used the serial communication to the watch
ff_vecs_t globalsat_sport_vecs = {
ff_type_serial, //type
FF_CAP_RW_ALL, //cap[3]
};
// This reads from a RAW dump bile from a watch
-// Usefull for testing generata a dumpfile with
+// Useful for testing generated dumpfile with
// gpsbabel -i globalsat,dump-file=<dumpfilename> -f /dev/ttyUSB0 -o gpx,garminextensions -F <1:st gpx file name>
// gpsbabel -i globalsat-bin -f <dumpfilename> -o gpx,garminextensions -F <2:nd gpx file name>
ff_vecs_t globalsat_sport_fvecs = {
in the data, i.e. only one data point shows a totally wrong longitude or latitude. Everything else in
the dataset seems ok, so I needed a way to sort out these errors. My solution is to calculate the speed
between successive points and drop points not between minspeed and maxspeed. This way I can sort out most
- of this annoying bugs, a side effect is that if a minimum speed > 0 is set points with the same coodinates are also
+ of this annoying bugs, a side effect is that if a minimum speed > 0 is set points with the same coordinates are also
dropped.
Fileformat GoPal
} else if (filename.startsWith("A_")&&(filename.length()>10)) { // here we expect at least 10 letters: A_YYYYMMDD...
datestr = filename.mid(2,8);
}
- // in buff we should now have something wich looks like a valid date starting with YYYYMMDD
+ // in buff we should now have something which looks like a valid date starting with YYYYMMDD
/*ck = (char*)*/strptime(qPrintable(datestr), "%Y%m%d", &filenamedate);
// if (((ck == NULL) || (*ck != '\0') )&&!(optdate))
// fatal(MYNAME ": Invalid date in filename \"%s\", try to set manually using \"date\" switch!\n", buff);
int n = sscanf(ibuf, "%lf%c %lf%c %ld%c %30[^,] %2s",
&lat, &latdir, &lon, &londir,
&alt, &alttype, desc, icon);
- /* Require at least first threee fields, otherwise ignore */
+ /* Require at least first three fields, otherwise ignore */
if (n < 2) {
xfree(sn);
continue;
writer->writeStartElement(tag);
// TODO: This seems questionable.
// We concatenate element content from multiple elements,
- // possibly from muliple input files, into one element.
+ // possibly from multiple input files, into one element.
// This is necessary to comply with the schema as
// these elements have maxOccurs limits of 1.
for (const auto& str : ge) {
} tag_mapping;
/*
- * xpath(ish) mappings between full tag paths and internal identifers.
+ * xpath(ish) mappings between full tag paths and internal identifiers.
* These appear in the order they appear in the GPX specification.
- * If it's not a tag we explictly handle, it doesn't go here.
+ * If it's not a tag we explicitly handle, it doesn't go here.
*/
/* /gpx/<name> for GPX 1.0, /gpx/metadata/<name> for GPX 1.1 */
}
/* Make a new shortname. Since this is a groundspeak extension,
we assume that GCBLAH is the current shortname format and that
- wpt_tmp refers to the currently parsed waypoint. Unfortunatley,
+ wpt_tmp refers to the currently parsed waypoint. Unfortunately,
we need to keep track of log_wpt counts so we don't collide with
dupe shortnames.
*/
{ gt_event, "Event" }, /* opencaching.de */
{ gt_webcam, "Webcam Cache" },
{ gt_webcam, "Webcam" }, /* opencaching.de */
- { gt_suprise, "Unknown Cache" },
+ { gt_surprise, "Unknown Cache" },
{ gt_earth, "Earthcache" },
{ gt_earth, "Earth" }, /* opencaching.de */
{ gt_cito, "Cache In Trash Out Event" },
fwrite_fixedstring(fd, CSTR(str), fieldlen);
}
-/* Auxiliar functions */
+/* Auxiliary functions */
#define MAX_INDATUM_INDEX 263
be_write16(&trk_points[j].deltanorth, trk_points[j].deltanorth);
be_write16(&trk_points[j].depth, trk_points[j].depth);
- /* Update bounding box in header if neccessary */
+ /* Update bounding box in header if necessary */
if (east > trk_head->ne_east) {
trk_head->ne_east = east;
}
/* 2008/06/24, O.K.: Use CET library for ascii-> unicode 2 converter */
// 2008/07/25, Dustin: Slight fix to make sure that we always null terminate the
// string, validate that the use of the CET library provides
-// conmforming output, remove my old junk converter code.
+// conforming output, remove my old junk converter code.
static unsigned int ascii_to_unicode_2(char* dst, const unsigned int dst_max_length, const char* src)
{
/* This file is machine-generated from the contents of style/ */
-/* by mkstyle.sh. Editing it by hand is an exeedingly bad idea. */
+/* by mkstyle.sh. Editing it by hand is an exceedingly bad idea. */
#include "defs.h"
#if CSVFMTS_ENABLED
"PROLOGUE \\# Waypoint name\n"
"PROLOGUE \\# Waypoint comment\n"
"PROLOGUE \\# Waypoint description\n"
- "PROLOGUE \\# Latitude in Degree and decimals (soutern hemisphere has neg. degrees)\n"
+ "PROLOGUE \\# Latitude in Degree and decimals (southern hemisphere has neg. degrees)\n"
"PROLOGUE \\# Longitude in degree and decimals (neg. numbers: west of Greenwich)\n"
"PROLOGUE \\# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS\n"
"#\n"
"#\n"
- "# FILE LAYOUT DEFINITIIONS:\n"
+ "# FILE LAYOUT DEFINITIONS:\n"
"#\n"
"FIELD_DELIMITER COLON\n"
"RECORD_DELIMITER NEWLINE\n"
Tries to initialize an itracku device attached to
serial port fd. fd must already be opened.
- Returns gbser_OK if the initialization is sucessful, a
+ Returns gbser_OK if the initialization is successful, a
non-zero integer otherwise.
*/
static int
break;
/*
- * Observered on Quest 3.0, 27xx, 27x, 29x.
+ * Observed on Quest 3.0, 27xx, 27x, 29x.
*/
case 120:
gps_category_type = data;
** @param [w] len [int32 *] packet length
**
** @return [void]
-** D109's and D110's are so simlar, we handle themw with the same code.
+** D109's and D110's are so similar, we handle them with the same code.
************************************************************************/
static void GPS_D109_Send(UC* data, GPS_PWay way, int32* len, int protoid)
{
}
if (!GPS_Get_Ack(fd, &tra, &rec)) {
- GPS_Error("A300_Send: Pid_Trk_Data not acknowledgedn");
+ GPS_Error("A300_Send: Pid_Trk_Data not acknowledged");
return FRAMING_ERROR;
}
}
return gps_errno;
}
if (!GPS_Get_Ack(fd, &tra, &rec)) {
- GPS_Error("A400_Send: Prx start data not acknowledgedn");
+ GPS_Error("A400_Send: Prx start data not acknowledged");
return FRAMING_ERROR;
}
**
** @param [r] port [const char *] serial port
** @param [r] lat [double] latitude (deg)
-** @param [r] lon [double] longitute (deg)
+** @param [r] lon [double] longitude (deg)
**
** @return [int32] success
************************************************************************/
GPS_D1007_Send(data,clp[i],&len);
break;
default:
- GPS_Error("A1007_Send: Unknown couse_lap type %d\n",
+ GPS_Error("A1007_Send: Unknown course_lap type %d\n",
gps_course_lap_type);
return PROTOCOL_ERROR;
}
GPS_D1012_Send(data,cpt[i],&len);
break;
default:
- GPS_Error("GPS_A1008_Send: Unknown couse_point type %d\n",
+ GPS_Error("GPS_A1008_Send: Unknown course_point type %d\n",
gps_course_point_type);
return PROTOCOL_ERROR;
}
A1005 Workout Limits Transfer Protocol
Capability A1005: D1005
*/
- /* Unimplemted and Undocumented, as listed from the following device/sw:
+ /* Unimplemented and Undocumented, as listed from the following device/sw:
GF305 3.70
Capability A601: D601
** Calculate lap data totals from individual track points. Also
** generates time stamps for track points if they don't have
** time stamps yet (using an arbitrary speed of 10 km/h which is
-** currently hardcoded. This is required so that couse points can
+** currently hardcoded. This is required so that course points can
** refer to track points and identify them uniquely.
**
** @param [w] clp [GPS_PCourse_Lap] course lap to be calculated
#define GARMIN_VID 0x91e
/* This is very sensitive to timing; libusb and/or the unit is kind of
- * sloppy about not obeying packet boundries. If this is too high, the
- * multiple packets responding to the device inquriy will be glommed into
+ * sloppy about not obeying packet boundaries. If this is too high, the
+ * multiple packets responding to the device inquiry will be glommed into
* one packet and we'll misparse them. If it's too low, we'll get partially
* satisfied reads. It turns out this isn't terrible because we still end
* up with DLE boundings and the upper layers (which are used to doing frame
* remove this.
*
* 9/2008 But wait, there's more. The very toggle reset that we *had* to
- * implement in 2006 to make non-Windows OSes work actually locks up verion
+ * implement in 2006 to make non-Windows OSes work actually locks up version
* 2.70 of the Venture HC. On that model, the second product request
* (you know, the one that we *use*, locks that device's protocol stack
* after the RET2INTR that immediately follows the REQBLK (and why is it
- * telling us to go into bulk mode followed by an immeidate EOF, anyway?)
+ * telling us to go into bulk mode followed by an immediate EOF, anyway?)
* that follows the request for product ID. 100% reproducible on Mac and
* Linux. Of course, we don't see this on the Windows system because
- * we don't have to jump through hooops to clear the spec-violating out
+ * we don't have to jump through hoops to clear the spec-violating out
* of state toggles there because those systems see only one configuration
* set ever.
*
/*
* Now that the bulk out and intr in packets are good, we send
* a product ID. On devices that respond totally on the intr
- * pipe, this does nothing interesting, but on devices that respon
+ * pipe, this does nothing interesting, but on devices that respond
* on the bulk pipe this will reset the toggles on the bulk in.
*/
if (gusb_intr_in_ep && gusb_bulk_in_ep && gusb_bulk_out_ep) {
lud->product_id = gusb_reset_toggles();
switch (lud->product_id) {
- // Search for "Venture HC" for more on this siliness..
+ // Search for "Venture HC" for more on this silliness..
// It's a case instead of an 'if' because I have a
// feeling there are more affected models either
// on the market or on the way.
/* @GPS_Math_ICS_EN_To_WGS84 *****************************************
**
** Convert WGS84 latitude and longitude to
-** Israeli Oldl Grid Eastings and Northings
+** Israeli Old Grid Eastings and Northings
**
** @param [r] E [double] ICS easting (metres)
** @param [r] N [double] ICS northing (metres)
//East Longitudes are positive, West longitudes are negative.
//North latitudes are positive, South latitudes are negative
//Lat and Long are in decimal degrees.
-//based on code witten by Chuck Gantz- chuck.gantz@globalstar.com
+//based on code written by Chuck Gantz- chuck.gantz@globalstar.com
//found at http://www.gpsy.com/gpsinfo/geotoutm/index.html
double k0 = 0.9996;
**
** @param [r] fd [int32] file descriptor
** @param [r] lat [double] latitude (deg)
-** @param [r] lon [double] longitute (deg)
+** @param [r] lon [double] longitude (deg)
**
** @return [int32] success
************************************************************************/
return gps_errno;
}
- // Acnowledge new speed
+ // Acknowledge new speed
if (!GPS_Send_Ack(fd, &tra, &rec)) {
return gps_errno;
}
gu->unit_version = le_read16(iresp.gusb_pkt.databuf+2);
}
/*
- * My goodnesss, this is fragile. During command syncup,
+ * My goodness, this is fragile. During command syncup,
* we need to know if we're at the end. The 0xfd packet
* is promised by Garmin engineering to be the last.
*/
/* @func GPS_Util_Put_Uint ********************************************
**
-** Put an unisgned int to a string
+** Put an unsigned int to a string
**
** @param [w] s [UC *] string to write to
** @param [r] v [const uint32] unsigned int to write
-/* @func GPS_Disble_Diagnose ***********************************************
+/* @func GPS_Disable_Diagnose ***********************************************
**
** Disable diagnosis mode
**
if (waypoint->altitude == unknown_alt) {
return 0;
}
- // We see way more data that's sourceed at 'zero' than is actually
+ // We see way more data that's sourced at 'zero' than is actually
// precisely at 0 MSL.
if (fabs(waypoint->altitude) < 0.01) {
return 0;
}
-/* Output something interesing when we can for route and trackpoints */
+/* Output something interesting when we can for route and trackpoints */
static void kml_output_description(const Waypoint* pt)
{
const char* alt_units;
cdataStr.append(" <ul>\n");
// Fortunately, all the mappy map URLs take lat/longs in the URLs, so
- // the substition is easy.
+ // the substitution is easy.
for (int tp = 0; !map_templates[tp].isEmpty(); tp++) {
cdataStr.append(" <li>\n");
cdataStr.append(" ");
case gt_locationless:
icon = "8.png";
break; // No unique icon.
- case gt_suprise:
+ case gt_surprise:
icon = "8.png";
break;
case gt_webcam:
lmx_print(const Waypoint* wpt)
{
/*
- * Desparation time, try very hard to get a good shortname
+ * Desperation time, try very hard to get a good shortname
*/
QString odesc = wpt->notes;
if (odesc.isEmpty()) {
format data.
- Combined processing of USR 2/3/4/5/6 formats into a single
file. The previous implementation did not support conversion
- between USR 2/3 and 4/5/6 or between 4/5/6 and 2/3 beause of
- the seperation in processing between lowranceusr.cc and
+ between USR 2/3 and 4/5/6 or between 4/5/6 and 2/3 because of
+ the separation in processing between lowranceusr.cc and
lowranceusr4.cc.
USR Background Information
User Data File version 4 - USRv4
Seems to be the best option for transferring data from older Lowrance units.
- Many of the counts (Number of Waypoints, Number of Routes, etc) were exanded from
+ Many of the counts (Number of Waypoints, Number of Routes, etc) were expanded from
16-bit integer values (maximum value of 65,535) to 32-bit (maxumum value 2,147,483,647)
USRv4 and above support a maximum of 20,000 trail-points (actually 24K and change).
USRv4 and above and GPX support trails with trail-segments.
break;
case 12: // cache type
if (strcmp(s, "Mystery Cache") == 0) {
- gcdata->type = gt_suprise;
+ gcdata->type = gt_surprise;
} else {
gcdata->type = gs_mktype(s);
}
* For some reason, Magellan used exactly the GPX spellings of
* everything except this one...
*/
- if (waypointp->gc_data->type == gt_suprise) {
+ if (waypointp->gc_data->type == gt_surprise) {
ctype = "Mystery Cache";
} else {
ctype = gs_get_cachetype(waypointp->gc_data->type);
static int wpt_len = 8;
static QString curfname;
static int extension_hint;
-// For Explorist GC/510/610/710 familes, bludgeon in GPX support.
+// For Explorist GC/510/610/710 families, bludgeon in GPX support.
// (This has nothing to do with the Explorist 100...600 products.)
static ff_vecs_t* gpx_vec;
static mag_info* explorist_info;
* we turn around an ack while we are reading from the device. It's
* quite spiffy when we're writing to the device. Since we're *way*
* less likely to lose data while reading from it than it is to lose data
- * when we write to it, we turn off the acks when we are predominatly
- * reading.
+ * when we write to it, we turn off the acks when we are predominantly
+ * reading.
*/
static int suppress_ack;
{ "ah", "Virtual cache"}, /* Binos: because you "see" them. */
{ "ak", "Micro-Cache" }, /* Looks like a film canister. */
{ "an", "Multi-Cache"}, /* Winery: grapes 'coz they "bunch" */
- { "s", "Unknown Cache"}, /* 'Suprise' cache: use a target. */
+ { "s", "Unknown Cache"}, /* 'Surprise' cache: use a target. */
{ "ac", "Event Cache"}, /* Event caches. May be food. */
{ nullptr, nullptr }
};
global_opts.inifile = nullptr;
gpsbabel_now = time(nullptr); /* gpsbabel startup-time */
- gpsbabel_time = current_time().toTime_t(); /* same like gpsbabel_now, but freezed to zero during testo */
+ gpsbabel_time = current_time().toTime_t(); /* same like gpsbabel_now, but frozen at zero during testo */
if (gpsbabel_time != 0) { /* within testo ? */
global_opts.inifile = inifile_init(QString(), MYNAME);
}
/*
- * read in from file to check a) valid format b) version of data formating
+ * read in from file to check a) valid format b) version of data formatting
* MRCB
*/
static void
} else if ((hdr[1] > 'h') && (hdr[1] <= 'i')) {
*mps_ver = 5;
} else {
- fatal(MYNAME ": Unsuppported version of mapsource file.\n");
+ fatal(MYNAME ": Unsupported version of mapsource file.\n");
}
/* Skip reliably over the "format details" section */
gbfseek(mps_file, reclen+1-3, SEEK_CUR);
delete_last_vowel(int start, char* istring, int* replaced)
{
/*
- * Basically impelement strrchr.
+ * Basically implement strrchr.
*/
*replaced = 0;
for (int l = strlen(istring); l > start; l--) {
for (struct replacements* r = replacements; r->orig; r++) {
int rl = strlen(r->orig);
/*
- * If word is in replacement list and preceeded by a
+ * If word is in replacement list and preceded by a
* space, replace it.
*/
if ((origslen - rl > 1) &&
#!/bin/sh
echo "/* This file is machine-generated from the contents of style/ */"
-echo "/* by mkstyle.sh. Editing it by hand is an exeedingly bad idea. */"
+echo "/* by mkstyle.sh. Editing it by hand is an exceedingly bad idea. */"
echo
# set the locale for sorting so that the collate order doesn't depend
gpsdata_type type; /* type of "data" */
time_t ctime;
time_t mtime;
- int left; /* number of un-readed route points */
+ int left; /* number of unread route points */
void* data; /* can be a waypoint, a route or a track */
int refct;
struct mmo_data_s** members;
{ 0x11, "Triangle" },
{ 0x12, "Square" },
{ 0x13, "Circle" },
- { 0x14, "Green bouy" },
- { 0x15, "Red bouy" },
- { 0x16, "Yellow bouy" },
+ { 0x14, "Green buoy" },
+ { 0x15, "Red buoy" },
+ { 0x16, "Yellow buoy" },
{ 0x17, "Geocache" },
{ -1, nullptr }
static void
mmo_writestr(const QString& str)
{
- // If UTF-8 is used instgead of Latin1, we fail in weird ways.
+ // If UTF-8 is used instead of Latin1, we fail in weird ways.
mmo_writestr(str.toLatin1().constData());
}
}
// RCR is a bitmask of possibly several log reasons..
- // Holux devics use a Event prefix for each waypt.
+ // Holux devices use a Event prefix for each waypt.
if (global_opts.masked_objective & WPTDATAMASK
&& ((bmask & (1U<<RCR) && itm->rcr & 0x0008)
|| (mtk_info.track_event & MTK_EVT_WAYPT)
/*
* Mac stumbler files are the same, except
- * use DDMM.mmm instad of DD.DDDD.
+ * use DDMM.mmm instead of DD.DDDD.
*/
if (strstr(ibuf, "Creator: MacStumbler")) {
macstumbler = 1;
// bunch of nested sscanfs. In 2017, robertl replaced the scanf stuff with
// a QString::split() to make it more tolerant of really empty fields from
// certain GPS implementations, but didn't replace the (somewhat funky) back
-// half to match the parse. There are definitely some readibility issues
+// half to match the parse. There are definitely some readability issues
// here.
// The numbering as per http://aprs.gids.nl/nmea/#gsa was the reference as
// the field numbers conveniently match our index.
if (optdate == nullptr) {
warning(MYNAME ": No date found within track (all points dropped)!\n");
- warning(MYNAME ": Please use option \"date\" to preset a valid date for thoose tracks.\n");
+ warning(MYNAME ": Please use option \"date\" to preset a valid date for those tracks.\n");
track_del_head(track);
return;
}
{
/*
* compare leading start of parametric sentence character ('$'), sentence address field, and trailing comma
- * to the desired sentence formatter mneumonic code (the 3rd-5th characters of the sentence address field).
- * The talker identifier mneumonic (the 1st-2nd characters of the sentence address field)
- * is likely "GP" for Global Posilioning System (GPS)
+ * to the desired sentence formatter mnemonic code (the 3rd-5th characters of the sentence address field).
+ * The talker identifier mnemonic(the 1st-2nd characters of the sentence address field)
+ * is likely "GP" for Global Positioning System (GPS)
* but other talkers like "IN" for Integrated Navigation can emit relevant sentences,
- * so we ignore the talker identifier mneumonic.
+ * so we ignore the talker identifier mnemonic.
*/
return strncmp(s1,"$",1) || strncmp(s1+3,sentenceFormatterMnemonicCode,3) || strncmp(s1+6,",",1);
}
}
if (tbuf != ibuf) {
- /* clear up the dynamic buffer we used because substition was required */
+ /* clear up the dynamic buffer we used because substitution was required */
xfree(tbuf);
}
}
}
}
- /* concats all fields to one string and release */
+ /* concatenates all fields to one string and release */
wpt->description = zip1.trimmed() + " " +
city.trimmed() + " " +
street.trimmed() + " " +
}
*val = strtod(str, &unit);
if (unit == nullptr) {
- fatal("%s: Unconvertable numeric value (%s)!\n", module, str);
+ fatal("%s: Unconvertible numeric value (%s)!\n", module, str);
}
if (fabs(*val) + 1 >= 1.0e25) {
*val = strtod(str, &unit);
if (unit == nullptr) {
- fatal("%s: Unconvertable numeric value (%s)!\n", module, str);
+ fatal("%s: Unconvertible numeric value (%s)!\n", module, str);
}
while (isspace(*unit)) {
}
/*
- * Convert string 'str' into geodetic latitide & longitude values. The format
+ * Convert string 'str' into geodetic latitude & longitude values. The format
* will be interpreted depending on 'grid' parameter.
*
- * return value: number of characters efective parsed
+ * return value: number of characters parsed
*/
int
}
case 'H':
/* Garmap2 has headers
- "H(2 spaces)LATITUDE(some spaces)LONGTITUDE(etc... followed by);track
+ "H(2 spaces)LATITUDE(some spaces)LONGITUDE(etc... followed by);track
everything else is
- H(2 chars)TN(tracknane\0)
+ H(2 chars)TN(trackname\0)
*/
if (points > 0) {
track = nullptr;
mkshort(mkshort_handle2,
trk->rte_name.isEmpty() ? CSTR(default_name) : trk->rte_name);
/* Carto Exploreur (popular in France) chokes on trackname headers,
- * so provide option to supppress these.
+ * so provide option to suppress these.
*/
if (!cartoexploreur) {
gbfprintf(file_out, "\n\nH TN %s\n", CSTR(name));
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
{
- "time", &timeopt, "Maximum time in seconds beetween two points",
+ "time", &timeopt, "Maximum time in seconds between two points",
nullptr, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr
},
ARG_TERMINATOR
# Waypoint name
# Waypoint comment
# Waypoint description
-# Latitude in Degree and decimals (soutern hemisphere has neg. degrees)
+# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
# Longitude in degree and decimals (neg. numbers: west of Greenwich)
# Height in meters
GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0
# Waypoint name
# Waypoint comment
# Waypoint description
-# Latitude in Degree and decimals (soutern hemisphere has neg. degrees)
+# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
# Longitude in degree and decimals (neg. numbers: west of Greenwich)
# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0 ,19700101,000000
# Waypoint name
# Waypoint comment
# Waypoint description
-# Latitude in Degree and decimals (soutern hemisphere has neg. degrees)
+# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
# Longitude in degree and decimals (neg. numbers: west of Greenwich)
# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0 ,19700101,000000
# Waypoint name
# Waypoint comment
# Waypoint description
-# Latitude in Degree and decimals (soutern hemisphere has neg. degrees)
+# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
# Longitude in degree and decimals (neg. numbers: west of Greenwich)
# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0
# Waypoint name
# Waypoint comment
# Waypoint description
-# Latitude in Degree and decimals (soutern hemisphere has neg. degrees)
+# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
# Longitude in degree and decimals (neg. numbers: west of Greenwich)
# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
,,,30.0621833,-91.6103500,1.0 ,20020525,170621
bool ok;
int fieldIdx = opt_name_fields.at(oidx).toInt(&ok);
if (ok) {
- // retrieve name commponent from given field number
+ // retrieve name component from given field number
check_field_index(fieldIdx);
} else {
// retrieve name component from given field name.
}
#endif
// Convert lla (lat, lng, alt) to ECEF
-// Algorith taken from these sources:
+// Algorithm taken from these sources:
// http://www.mathworks.com/matlabcentral/fileexchange/7942-covert-lat-lon-alt-to-ecef-cartesian
// http://en.wikipedia.org/wiki/Geodetic_system#From_ECEF_to_geodetic
// http://earth-info.nga.mil/GandG/publications/tr8350.2/wgs84fin.pdf
npoi++;
}
if (npoi == 0) { // do not read if POIs are set (consider set & read distinct operations)
- skytraq_read(); // first read tracks (if not supressed by cmd line params)
+ skytraq_read(); // first read tracks (if not suppressed by cmd line params)
// we need this call it initialized waypoint list etc...
skytraq_rd_deinit(); // skytraq_read called system_reset, which changes the baud rate.
setCodec(XmlTextCodec::instance);
}
-// We must overide the encoding, we don't want to use XmlTextCode::name().
+// We must override the encoding, we don't want to use XmlTextCode::name().
void XmlStreamWriter::writeStartDocument()
{
writeProcessingInstruction(QStringLiteral("xml version=\"1.0\" encoding=\"UTF-8\""));
PROLOGUE \# Waypoint name
PROLOGUE \# Waypoint comment
PROLOGUE \# Waypoint description
-PROLOGUE \# Latitude in Degree and decimals (soutern hemisphere has neg. degrees)
+PROLOGUE \# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
PROLOGUE \# Longitude in degree and decimals (neg. numbers: west of Greenwich)
PROLOGUE \# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
#
#
-# FILE LAYOUT DEFINITIIONS:
+# FILE LAYOUT DEFINITIONS:
#
FIELD_DELIMITER COLON
RECORD_DELIMITER NEWLINE
};
*/
//
-// Note that we've disabled the write capabilites for the tpo2
+// Note that we've disabled the write capabilities for the tpo2
// format at present. The "testo" tests were failing on some
// platforms and there wasn't anyone willing to work on the problem.
// If this is fixed in the future we can go back to the tpo2_args[]
78);
/* there is no elevation data for the waypoints */
- /* this is unecessary, the constructor will do this anyway. */
+ /* this is unnecessary, the constructor will do this anyway. */
waypoint_temp->altitude = unknown_alt;
track_add_wpt(track_temp, waypoint_temp);
// The original untested check for unknown altitude was for 0xfffd000c (-196596 cm),
// but a test case submitted later used 0xffce0000 (-3276800 cm).
if (altitude == -3276800) { // Unknown altitude
- /* this is unecessary, the constructor will do this anyway. */
+ /* this is unnecessary, the constructor will do this anyway. */
waypoint_temp->altitude = unknown_alt;
} else {
waypoint_temp->altitude = (double) altitude / 100.0; // Meters
tpo_rd_init(const QString& fname)
{
- // preprare for an attempt to deallocate memory that may or may not get allocated
+ // prepare for an attempt to deallocate memory that may or may not get allocated
// depending on the options used.
tpo_index_ptr = 0;
tpo_wp_index = nullptr;
3. Add a new if() clause to tpo_write_file_header(). Copy the header bytes definition
from the previous step.
4. Recompile gpsbabel.
- 5. You should now be able write TPO ouput in the new state's format. For example, if
+ 5. You should now be able write TPO output in the new state's format. For example, if
you added support for Texas:
gpsbabel -t -i gpx -f input.gpx -o tpo,state="TX" -F output.tpo */
static void
}
else {
- fatal(MYNAME ": writing ouput for state \"%s\" is not currently supported.\n", output_state);
+ fatal(MYNAME ": writing output for state \"%s\" is not currently supported.\n", output_state);
}
}
}
if (opt_speed) {
if (last_speed_time.msecsTo(wpt->GetCreationTime()) != 0) {
- // If we have mutliple points with the same time and
+ // If we have multiple points with the same time and
// we use the pair of points about which the time ticks then we will
// underestimate the distance and compute low speeds on average.
// Therefore, if we have multiple points with the same time use the
opt_move || opt_fix || opt_speed ||
(trackfilter_opt_count() == 0) /* do pack by default */
);
- /* in case of a formated title we also need valid timestamps */
+ /* in case of a formatted title we also need valid timestamps */
if ((opt_title != nullptr) && (strchr(opt_title, '%') != nullptr)) {
need_time = true;
}
double us;
char sep[2];
- /* If we have somethine we're pretty sure is a date, parse that
+ /* If we have something we're pretty sure is a date, parse that
* first, skip over it, and pass that back to the caller)
*/
time_t ldate = unicsv_parse_date(str, &consumed);
unicsv_fatal_outside(const Waypoint* wpt)
{
*fout << "#####\n";
- fatal(MYNAME ": %s (%s) is outside of convertable area of grid \"%s\"!\n",
+ fatal(MYNAME ": %s (%s) is outside of convertible area of grid \"%s\"!\n",
wpt->shortname.isEmpty() ? "Waypoint" : qPrintable(wpt->shortname),
pretty_deg_format(wpt->latitude, wpt->longitude, 'd', nullptr, 0),
gt_get_mps_grid_longname(unicsv_grid_idx, MYNAME));
* Allocate a string using a format list with optional arguments
* Returns -1 on error.
* If return value is anything else, *strp will be populated with an
- * allocated string containging the formatted buffer.
+ * allocated string containing the formatted buffer.
*
- * Freeing that is the responsbility of the caller.
+ * Freeing that is the responsibility of the caller.
*/
int
} else if (outsize == bufsize - 1) {
/* This is ambiguous. May mean that the output string
* exactly fits, but on some systems the output string
- * may have been trucated. We can't tell.
+ * may have been truncated. We can't tell.
* Just double the buffer size for next time.
*/
nextsize = bufsize * 2;
return "Multi-Cache";
case gt_event:
return "Event Cache";
- case gt_suprise:
+ case gt_surprise:
return "Unknown Cache";
case gt_webcam:
return "Webcam Cache";
maxlen = codec->name().size();
}
}
- info << "Avaialble Codecs:" << endl;
+ info << "Available Codecs:" << endl;
info << qSetFieldWidth(8) << "MIBenum" << qSetFieldWidth(maxlen+1) << "Name" << qSetFieldWidth(0) << "Aliases" << endl;
for (auto mib : mibs) {
auto codec = QTextCodec::codecForMib(mib);
FILE FORMAT INFO
=================
-File has csv extention, and is somewhat csv like creature...
+File has csv extension, and is somewhat csv like creature...
All lines end with \r\n
First line is a header line. It contains no nulls.
Following lines are record lines. They are comma separated, but fields always
-have the exact same length (per field), and therfore, the commas are always
+have the exact same length (per field), and therefore, the commas are always
at the exact same position on the line. Fields are padded with nulls, in case
they have shorter value then the fixed field length.
Two modes are available: basic and advanced.
svp[i]->name = svec->name;
svp[i]->vec = (ff_vecs_t*) xmalloc(sizeof(*svp[i]->vec));
svp[i]->extensions = xcsv_file.extension;
- *svp[i]->vec = *vec_list[0].vec; /* Interits xcsv opts */
+ *svp[i]->vec = *vec_list[0].vec; /* Inherits xcsv opts */
/* Reset file type to inherit ff_type from xcsv for everything
* except the xcsv format itself, which we leave as "internal"
*/
{
/* This is a bit tacky, but it allows a hint whether we've seen
* this data or not in the life cycle of this run. Of course,
- * the caches could have been filtered out of existance and not
+ * the caches could have been filtered out of existence and not
* all waypoints may have this and a few other pitfalls, but it's
* an easy and fast test here.
*/
}
/*
- * Recompund bounding box based on new position point.
+ * Recompute bounding box based on new position point.
*/
void
waypt_add_to_bounds(bounds* bounds, const Waypoint* waypointp)
session(other.session),
extra_data(other.extra_data)
{
- // deep copy geocache data unless it is the specail static empty_gc_data.
+ // deep copy geocache data unless it is the special static empty_gc_data.
if (other.gc_data != &Waypoint::empty_gc_data) {
gc_data = new geocache_data(*other.gc_data);
}
fs = rhs.fs;
session = rhs.session;
extra_data = rhs.extra_data;
- // deep copy geocache data unless it is the specail static empty_gc_data.
+ // deep copy geocache data unless it is the special static empty_gc_data.
if (rhs.gc_data != &Waypoint::empty_gc_data) {
gc_data = new geocache_data(*rhs.gc_data);
}
if (substitutions.contains(key)) {
return substitutions[key];
}
- // No substition found? Just return original.
+ // No substitution found? Just return original.
return key;
}
/* ANYNAME -- Ignore -- this is output magic. */
break;
case XT_INDEX:
- /* IGNORE -- Calculated Sequence # For Ouput*/
+ /* IGNORE -- Calculated Sequence # For Output*/
break;
case XT_SHORTNAME:
wpt->shortname = csv_stringtrim(s, enclosure);
fabs(lon));
break;
case XT_LON_INT32DEG:
- /* longitudee as an integer offset from 0 degrees */
+ /* longitude as an integer offset from 0 degrees */
buff = QString().sprintf(fmp.printfc.constData(),
dec_to_intdeg(lon));
break;
case XT_LON_DDMMDIR:
- /* longidute as (degrees * 100) + decimal minutes, with W/E after it*/
+ /* longitude as (degrees * 100) + decimal minutes, with W/E after it*/
buff = dec_to_human(fmp.printfc.constData(), "WE", degrees2ddmm(lon));
break;
case XT_LON_HUMAN_READABLE:
if (tokens[0] == "INTERNAL") {
xcsv_file.type = ff_type_internal;
}
- // this is almost inconcievable...
+ // this is almost inconceivable...
if (tokens[0] == "SERIAL") {
xcsv_file.type = ff_type_serial;
}
//
if (op == "OFIELD") {
unsigned options = 0;
- // Note: simplifieid() has to run after split().
+ // Note: simplified() has to run after split().
if (tokens.size() < 3) {
Fatal() << "Invalid OFIELD line: " << tokenstr;
}
}
if (codec == nullptr) {
// According to http://www.opentag.com/xfaq_enc.htm#enc_default , we
- // should assume UTF-8 in absense of other informations. Users can
+ // should assume UTF-8 in absence of other information. Users can
// EASILY override this with xml_init().
codec = QTextCodec::codecForName("UTF-8");
}
/* writer */
static void xol_fatal_outside(const Waypoint* wpt) {
- fatal(MYNAME ": %s (%s) is outside of convertable area \"%s\"!\n",
+ fatal(MYNAME ": %s (%s) is outside of convertible area \"%s\"!\n",
wpt->shortname.isEmpty() ? "Waypoint" : qPrintable(wpt->shortname),
pretty_deg_format(wpt->latitude, wpt->longitude, 'd', nullptr, 0),
gt_get_mps_grid_longname(grid_swiss, MYNAME));
(all_bounds.min_lon + all_bounds.max_lon) / 2,
&x, &y)) {
fatal(MYNAME
- ": At least one point is outside of convertable area \"%s\"!\n",
+ ": At least one point is outside of convertible area \"%s\"!\n",
gt_get_mps_grid_longname(grid_swiss, MYNAME));
}